<template>
  <el-container style="height: 100vh">
    <el-aside class="aside" width="200px" style="background-color: rgb(238, 241, 246)">

      <el-menu router>
        <div class="header-logo">
          <a href="javascript:;"></a>
        </div>
        <Aside :tree-data="menus"></Aside>
      </el-menu>
    </el-aside>

    <el-container>
      <el-header class="header">
        <Header></Header>
      </el-header>

      <el-main>
        <router-view></router-view>
      </el-main>
    </el-container>
  </el-container>
</template>

<script>
import Aside from '@/components/Aside';
import Header from '@/components/Header';

export default {
  name: 'admin-manage',
  components: {
    Aside,
    Header
  },
  data() {
    return {
      menus: [],
    }
  },

  mounted() {
    this.menus = localStorage.getItem('menus')
        ? JSON.parse(localStorage.getItem('menus'))
        : []
  },

  methods: {},
}
</script>

<style lang="scss" scoped>
.header {
  text-align: right;
  font-size: 16px;
  padding: 0;
  border-bottom: 1px solid #E4E7ED;
  z-index: 99;
}

.aside {
  z-index: 100;
  box-shadow: rgba(0, 21, 41, 0.35) 1px 0 4px;
}

.header-logo {
  width: 55px;
  height: 55px;
  margin: 20px auto;
  //background: #f60;

  a {
    display: inline-block;

    &:before {
      content: '';
      display: inline-block;
      width: 75px;
      height: 75px;
      background: url("/public/mall_logo.png") no-repeat center;
      background-size: contain;
    }
  }
}

</style>
